"""
@Time: 2020/12/29 下午 3:06
@Author: jinzhuan
@File: msra.py
@Desc: 
"""
import sys
sys.path.append('/data/zhuoran/code/cognlp')
sys.path.append('/data/zhuoran/cognlp')

from cognlp.io.loader.ner.msra import MSRANerLoader
from cognlp.io.processor.ner.msra import MsraNerProcessor

loader = MSRANerLoader()
train_data, dev_data, test_data = loader.load_all('../../../../cognlp/data/ner/MSRA/data')
processor = MsraNerProcessor(path='../../../../cognlp/data/ner/MSRA/data')
train_datable = processor.process(train_data)
train_datable.save_table('../../../../cognlp/data/ner/MSRA/data/train.json')

dev_datable = processor.process(dev_data)
dev_datable.save_table('../../../../cognlp/data/ner/MSRA/data/dev.json')

test_datable = processor.process(test_data)
test_datable.save_table('../../../../cognlp/data/ner/MSRA/data/test.json')
print(1)
